package com.shirley.pers.zhufengfmvi.entities;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Description: <br/>
 * <p/>
 * Copyright (c) , 2016, Shirley Xian <br/>
 * This program is protected by copyright laws. <br/>
 * ClassName: DiscoveryColumnsListInfo<br/>
 * Date: 2016/4/7 15:55
 *
 * @author Shirley Xian
 * @version 1.0
 */
public class DiscoveryColumnsListInfo {

    /**
     * id : 1
     * orderNum : 2
     * title : 听友圈子
     * subtitle : 给你获得一种超能力的机会，你选择什么超能力？
     * coverPath : http://fdfs.xmcdn.com/group9/M07/1C/8C/wKgDYlV3rd2zGc9PAAAgRAu1VLU052.png
     * contentType : xzone
     * url :
     * sharePic :
     * enableShare : false
     * contentUpdatedAt : 0
     */

    private long id;
    private long orderNum;
    private String title;
    private String subtitle;
    private String coverPath;
    private String contentType;
    private String url;
    private String sharePic;
    private boolean enableShare;
    private long contentUpdatedAt;

    public void parseJson(JSONObject jsonObject) throws JSONException {
        id = jsonObject.getLong("id");
        orderNum = jsonObject.getLong("orderNum");
        title = jsonObject.getString("title");
        subtitle = jsonObject.getString("subtitle");
        coverPath = jsonObject.getString("coverPath");
        contentType = jsonObject.getString("contentType");
        url = jsonObject.getString("url");
        sharePic = jsonObject.getString("sharePic");
        enableShare = jsonObject.getBoolean("enableShare");
        contentUpdatedAt = jsonObject.getLong("contentUpdatedAt");
    }

    public long getId() {
        return id;
    }

    public long getOrderNum() {
        return orderNum;
    }

    public String getTitle() {
        return title;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public String getCoverPath() {
        return coverPath;
    }

    public String getContentType() {
        return contentType;
    }

    public String getUrl() {
        return url;
    }

    public String getSharePic() {
        return sharePic;
    }

    public boolean isEnableShare() {
        return enableShare;
    }

    public long getContentUpdatedAt() {
        return contentUpdatedAt;
    }
}
